package academic.emailClient.control.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;

import academic.emailClient.model.EmailClientModel;
import academic.emailClient.view.EmailClientViewInterface;

public class FilterMsgListener implements ActionListener {

	private EmailClientViewInterface view;
	private EmailClientModel model;
	

/**
 * FilterMsgListener Constructor
 * @param view
 * @param model
 */
public FilterMsgListener(EmailClientViewInterface view, EmailClientModel model) {
	super();
	this.view = view;
	this.model = model;
}

/**
 * Handle Filter Msg event
 */
@Override
public void actionPerformed(ActionEvent e) {
	HashMap<String, String> paths=model.getAllSubfoldersPaths();
	view.showFilterView(paths);
	view.addFilterMessageListener(new FilterMsgListener(view,model));
	}
}
